<?php
$a=$_GET['mingcheng'];
$b=$_GET['miaoshu'];
$c=$_GET['ctime']=time();
@mysql_connect('localhost', 'root', 'root');
if (mysql_errno()) {
	die(mysql_errno());
}
mysql_select_db('blog');
mysql_set_charset('utf8');
$sql="insert into `title`(`name`,`miaoshu`,`ctime`) values('$a','$b','$c') ";

$res=mysql_query($sql);

if ($res) {
    echo "<script>alert('添加成功');window.location.href='title.php'</script>";
}
else{
    echo "<script>alert('添加失败');window.location.href='title.php'</script>";
}

mysql_close();


?>